package course;

public class Course {
    private int courseId;
    private String courseName;
    private String location;
    private String time;
    private Teacher teacher;
    private double credits;  // 学分属性

    // 构造方法
    public Course(int courseId, String courseName, String location, String time, double credits) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.location = location;
        this.time = time;
        this.credits = credits;
        this.teacher = null;
    }

    // getter和setter方法
    public int getCourseId() {
        return courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public String getLocation() {
        return location;
    }

    public String getTime() {
        return time;
    }

    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }

    public double getCredits() {
        return credits;
    }

    public void setCredits(double credits) {
        this.credits = credits;
    }
}
